<template>
  <view>
    <text>{{hello}}</text>
    <view class="goods-item">
      <!-- 商品左侧区域 -->
      <view class="goods-item-left">
        <image :src="item.goods_small_logo || defaultImg" mode=""></image>
      </view>
      <!-- 商品右侧区域 -->
      <view class="goods-item-right">
        <!-- 商品标题 -->
        <view class="goods-info-title">{{item.goods_name}}</view>
        <!-- 商品价格 -->
        <view class="goods-info-box">
          <view class="goods-price">
            ￥{{item.goods_price}}
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-goods-one",
    data() {
      return {
        defaultImg: 'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png'
      };
    },
    props: {
      // 商品的信息对象
      goods:{
        type: Object,
        default: {},
      },
      hello:{
        type:String,
        default:""
      }
    },
  }
</script>

<style lang="scss">
.goods-item {
    display: flex;
    padding: 8px 1px;
    border-bottom: 1px solid #afafaf;
  
    .goods-item-left {
      margin-right: 10px;
  
      image {
        width: 100px;
        height: 100px;
        display: block;
      }
    }
  
    .goods-item-right {
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      // align-items: center;
  
      .goods-info-title {
        font-size: 13px;
      }
  
      .goods-info-box {
        .goods-price {
          font-size: 16px;
          color: #C00000;
        }
      }
    }
  }
</style>
